import request from "../utils/request.js";
// 接口地址
const loginUrl = 'members/login';
const registerUrl = 'members/register';
const code = 'public/sms/send'

const phone ='/api/regular_users/count?'
const account='/api/user/count?'
const addMember = '/api/regular_users/add?'
const groupList ='/api/user_group/get_list?register_min=2&register_max=3'
const lookUerinfo ='/api/user/get_obj?'

// 登录
export function login(data) {
  return request({
    url: loginUrl,
    method: 'post',
    data
  })
}
// 注册
export function register(data) {
  return request({
    url: registerUrl,
    method: 'post',
    data
  })
}

// 验证码
export function getCode(data) {
  return request({
    url: code,
    method: 'post',
    data
  })
}



export function lookPhone(data){
	return request({
	  url: phone,
	  method: 'get',
	  data
	})
}
export function lookAccount(data){
	return request({
	  url: account,
	  method: 'get',
	  data
	})
}
export function addInfo(data) {
  return request({
    url: addMember,
    method: 'post',
    data
  })
}
export function getGroupList(data){
	return request({
	  url: groupList,
	  method: 'get',
	  data
	})
}
export function getUserInfo(data){
	return request({
	  url: lookUerinfo,
	  method: 'get',
	  data
	})
}

